<ui:composition template="/template.xhtml"
				xmlns="http://www.w3.org/1999/xhtml"
				xmlns:ui="http://java.sun.com/jsf/facelets"
				xmlns:h="http://java.sun.com/jsf/html"
				xmlns:f="http://java.sun.com/jsf/core"
				xmlns:p="http://primefaces.org/ui">
	
	<ui:define name="conteudo">
		
		
		<h:dataTable value="#{vooBean.voos}" var="v" > 

			<h:column>
				<f:facet name="header">
					<h:outputText value="Cod Cidade Partida" />
				</f:facet>
				<h:outputText value="#{v.cidadePartida}" />
			</h:column>	
			
			<h:column>
				<f:facet name="header">
					<h:outputText value="Cod. Cidade Destino" />
				</f:facet>
				<h:outputText value="#{v.cidadeChegada}" />
			</h:column>
			
			<h:column>
				<f:facet name="header">
					<h:outputText value="Data Partida" />
				</f:facet>
				<h:outputText value="#{v.dataPartida}" />
			</h:column>	
			
			<h:column>
				<f:facet name="header">
					<h:outputText value="Valor" />
				</f:facet>
				<h:outputText value="#{v.valor}" />
			</h:column>			
					
			
			<h:column>
				<f:facet name="header">
					<h:outputText value="Ações" />
				</f:facet>
				
				<h:form>
					<h:commandButton value="Excluir" action="#{vooBean.removerVoo(v)}"/>
					<h:commandButton value="Alterar" action="#{voo.prepararEdicao(v)}"/>
				</h:form>
			</h:column>
		
		</h:dataTable>
		
	</ui:define>
	
</ui:composition>
